When your team works with common IDE/editors such as Visual Studio, VS Code, IntelliJ IDEA or Eclipse, there are advantages to using the "Structure101 Connector" IDE plugin.

The plugin lets Studio and Workspace present models that are tightly aligned with the project structure as seen inside your IDE. This means that your visualizations, specs and restructuring actions are expressed in terms familiar to team members.

The plugin also facilitates the 2-way navigation between Workspace and your IDE.

To install, download and install Workspace and the "Structure101 Connector" plugin specific to your IDE/Editor.

Once you have your IDE/editor running (with the plugin installed), and the same projects open in both Workspace and the IDE/editor, you can tell Workspace to connect to it for navigation. To do this, click the "Connect to Source Editor" (the red link icon) button in Workspace:

The link button will turn "green" to indicate success:

Once the link is established, you can navigate from any item in the Workspace Structure Map to the source in the IDE using the context menu (mouse-over the item and click on the 3 vertical dots that appear to the left of the item's icon). The context menu also shows the shortcut action (e.g. alt-click to 'navigate to source'):

The file should open with the cursor at the first line of the corresponding source in your IDE/editor.

The Structure101 Connector plugin adds a command to your editor's context menu to navigate from source to Structure Map - right-click to bring up the context menu with the "Show in Structure Map" option. In general you should be able to navigate from anywhere in the source of an item (e.g. a function) but this can vary between IDE/editors/languages- for instance it may be sensitive to what is selected in the source).

IDE Project Explorer & Structure101 Workspace Project Structure Alignment

For source navigation to work successfully, your IDE’s Project Explorer and Structure101’s Workspace Project Structure must be completely aligned. The Project Root name in each must be the same, with the same sub-directories or folders as children of the Root entity.

How you align the two depends on your IDE.

Eclipse CDT

Typically, your project is already setup in Eclipse CDT, in which case, you setup your Structure101 Studio project (.hsp) using pre-transformations to align your actual project structure in Structure101 to the same project structure in your IDE. For example:

When your Structure101 model contains the full path it can be stripped with pre-transformations to align with your project in your IDE.

 

Visual Studio & Visual Studio Code

The Structure101 Visual Studio and Visual Studio Code Connector Extensions rely on the Structure101_Project_Root user (or system) environment variable to align your IDE with the Structure101 Workspace Project Structure.

Set the Structure101_Project_Root environment variable to the parent directory of your project’s source root directory, for example, C:\Users\MyName\Dev\. Let’s assume you have 2 projects under C:\Users\MyName\Dev, ProjectA and ProjectB. When you open in your IDE, the root item in your Project Explorer will be ProjectA or ProjectB. With the Structure101_Project_Root environment variable set to C:\Users\MyName\Dev\ the Connector extension pre-pends C:\Users\MyName\Dev\ to all items in your Structure101 model so that they are now perfectly aligned with the location of your code in your IDE.